<!--//   iconfong组件 使用 <icon name="test">-->
<template>
  <i
    class="iconfont"
    :class="[name]"
    @click="$emit('click')"
    :style="{ color: color, fontSize: size + 'px', ...styles }"
  ></i>
</template>
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
@Component
export default class extends Vue {
  @Prop({ default: '' }) private name!: string
  @Prop({ default: '' }) private color?: string
  @Prop({ default: '' }) private size?: string | number
  @Prop({
    default: function() {
      return {}
    }
  })
  private styles?: Record<string, string>
}
</script>
